.el-menu {
  width: 100%;
  border: none;
  overflow: hidden;

  &.el-menu--collapse :deep(.el-menu-item) {
    .el-menu-tooltip__trigger {
      padding: 0 !important;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  &.el-menu--collapse :deep(.el-sub-menu) {
    .el-sub-menu__title {
      padding: 0 !important;
      justify-content: center;
    }
  }
}

@mixin item-bg($color) {
  &::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 3px;
    width: 90%;
    height: 80%;
    content: '';
    background-color: $color !important;
  }
}
:deep(.menu-card.el-menu) {
  .el-menu-item {
    & > * {
      z-index: 1;
    }
    background-color: transparent !important;
    &:hover {
      @include item-bg(var(--el-color-info-light-9));
      color: var(--el-text-color-regular);
    }
    &.is-active {
      background-color: transparent !important;
      @include item-bg(var(--el-menu-hover-bg-color));
    }
  }
  .el-sub-menu {
    .el-sub-menu__title {
      & > * {
        z-index: 1;
      }
      &:hover {
        color: var(--el-text-color-regular) !important;
        background-color: transparent !important;
        @include item-bg(var(--el-color-info-light-9));
      }
    }
    //激活的二级菜单标题
    &.is-active {
      .el-sub-menu__title {
        color: var(--el-color-primary) !important;
      }
    }
  }
}
